package mio.model;

public class LineChange {
	
	private Stop in;
	private Line from;
	private Line to;
	
	public LineChange(Stop in, Line from, Line to){
		this.in = in;
		this.from = from;
		this.to = to;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Cambio de linea en");
		sb.append(" " + in);
		sb.append(" de " + from);
		sb.append(" a " + to);
		
		return sb.toString();
	}
	
	public boolean equals(Object obj){
		if(!(obj instanceof LineChange))
			return false;
		
		LineChange other = (LineChange) obj;
		return 	in.equals(other.getIn()) &&
				from.equals(other.getFrom()) &&
				to.equals(other.getTo());
	}

	public Stop getIn() {
		return in;
	}

	public Line getFrom() {
		return from;
	}

	public Line getTo() {
		return to;
	}

}
